package com.base.app_core.service.Retrofit;


import com.base.app_core.model.Config;
import com.base.app_core.model.PoiList;
import com.base.app_core.model.RedPacketStatusVo;
import com.base.app_core.model.Region;
import com.base.app_core.model.ShareUser;
import com.base.app_core.model.TodayHistoryStock;
import com.base.app_core.model.UserDeposit;
import com.base.app_core.model.UserHistoryStock;
import com.base.app_core.model.UserSmsVo;
import com.base.app_core.model.dto.Advertiser;
import com.base.app_core.model.dto.CosVo;
import com.base.app_core.model.params.GetSmsCodeParam;
import com.base.app_core.model.rqview.WxLoginView;
import com.base.app_core.service.user.model.BindAliUserAcount;
import com.base.app_core.service.user.model.User;
import com.base.app_core.service.user.model.UserAccount;
import com.base.app_core.util.AppConstants;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;

/**
 * Created by jiansheng.li on 2017/4/26.
 */

public interface RestServer {

    @GET(AppConstants.URLCONST.FETCHREGIONBYPARENTID)
    Observable<HttpResult<List<Region>>> fetchByParentId(@Path(AppConstants.FIELD.PARENTID) Long parentId);

    @POST(AppConstants.URLCONST.WXLOGIN)
    Observable<HttpResult<User>> wxLogin(@Body WxLoginView code);

    @POST(AppConstants.URLCONST.POSTUSERLOC)
    Observable<HttpResult<User>> postUserLoc(@Body Map<String, Object> map);

    @POST(AppConstants.URLCONST.GET_POI_LIST)
    Observable<HttpResult<List<PoiList>>> getPoiList(@Body Map<String, Object> map);

    @POST(AppConstants.URLCONST.FETCH_RECV_SND_REDPACKET_COUNT)
    Observable<HttpResult<Map>> fetchRecvSndRedPacketCount();

    @POST(AppConstants.URLCONST.FETCHSTOCKPRICELOG)
    Observable<HttpResult<List<TodayHistoryStock>>> fetchStockPriceLog(@Body Map<String, Object> map);

    @POST(AppConstants.URLCONST.FETCHSTOCKCOUNTLOG)
    Observable<HttpResult<List<UserHistoryStock>>> fetchStockCountLog(@Body Map<String, Object> map);

    @POST(AppConstants.URLCONST.POSTDEPOSIT)
    Observable<HttpResult<Object>> postDeposit(@Body Map<String, Object> map);

    @POST(AppConstants.URLCONST.ALIPOSTDEPOSIT)
    Observable<HttpResult<Object>> alipostDeposit(@Body Map<String, Object> map);

    @POST(AppConstants.URLCONST.FETCHHISTORYDEPOSITLOG)
    Observable<HttpResult<List<UserDeposit>>> fetchHistoryDepositLog(@Body Map<String, Object> map);

    @POST(AppConstants.URLCONST.USER_SHARE_LIST)
    Observable<HttpResult<List<ShareUser>>> fetchUserShareList(@Body Map<String, Object> map);

    @POST(AppConstants.URLCONST.FETCH_USER_ACCOUNT)
    Observable<HttpResult<UserAccount>> fetchUserAccount();

    @POST(AppConstants.URLCONST.GETSMSCODE)
    Observable<HttpResult<UserSmsVo>> getSmsCode(@Body GetSmsCodeParam datamap);

    @POST(AppConstants.URLCONST.SYSTEM_CONFIG)
    Observable<HttpResult<List<Config>>> getSystemConfig();

    @POST(AppConstants.URLCONST.CHECK_STATUS)
    Observable<HttpResult<RedPacketStatusVo>> checkStatus();

    @POST(AppConstants.URLCONST.BINDALIACCOUNT)
    Observable<HttpResult<BindAliUserAcount>> bindAliAccount(@Body Map<String, Object> params);

    @POST(AppConstants.URLCONST.INDEX_GET_COS_KEY)
    Observable<HttpResult<CosVo>> indexGetCosKey();

    @POST(AppConstants.URLCONST.IDNEX_GET_ADVERTISE_INFO)
    Observable<HttpResult<List<Advertiser>>> indexGetAdvertiseInfo(@Body Map<String, Object> params);
}
